<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>众筹项目管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/bttk/tUserCrowdProject/">众筹项目列表</a></li>
		<li class="active"><a href="${ctx}/bttk/tUserCrowdProject/form?id=${tUserCrowdProject.id}">众筹项目<shiro:hasPermission name="bttk:tUserCrowdProject:edit">${not empty tUserCrowdProject.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="bttk:tUserCrowdProject:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="tUserCrowdProject" action="${ctx}/bttk/tUserCrowdProject/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">商户编号：</label>
			<div class="controls">
			
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">商户众筹项目名称：</label>
			<div class="controls">
				<form:input path="projectName" htmlEscape="false" maxlength="255" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹总价：</label>
			<div class="controls">
				<form:input path="totalPrice" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹发起价格：</label>
			<div class="controls">
				<form:input path="launchPrice" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">帮筹价格：</label>
			<div class="controls">
				<form:input path="helpPrice" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">帮筹数量：</label>
			<div class="controls">
				<form:input path="helpAmount" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">商户众筹项目开始日期：</label>
			<div class="controls">
				<input name="startDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${tUserCrowdProject.startDate}" pattern="yyyy/MM/dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">商户众筹项目结束日期：</label>
			<div class="controls">
				<input name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${tUserCrowdProject.endDate}" pattern="yyyy/MM/dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">客户众筹的有效期限（天）：</label>
			<div class="controls">
				<form:input path="crowdDays" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">累计发起众筹活动次数：</label>
			<div class="controls">
				<form:input path="totalLaunchAmount" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">累计帮筹次数：</label>
			<div class="controls">
				<form:input path="totalHelpAmount" htmlEscape="false" maxlength="11" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片1：</label>
			<div class="controls">
				<form:input path="image1" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片2：</label>
			<div class="controls">
				<form:input path="image2" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片3：</label>
			<div class="controls">
				<form:input path="image3" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片4：</label>
			<div class="controls">
				<form:input path="image4" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片5：</label>
			<div class="controls">
				<form:input path="image5" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目描述图片6：</label>
			<div class="controls">
				<form:input path="image6" htmlEscape="false" maxlength="1023" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹活动文字说明：</label>
			<div class="controls">
				<form:input path="description" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">众筹项目网页分享地址：</label>
			<div class="controls">
				<form:input path="projectUrl" htmlEscape="false" maxlength="2047" class="input-xlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="bttk:tUserCrowdProject:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>